package model

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
)

type ContextAuth struct {
	Role     string `json:"role"`
	Unique   string `json:"unique"`
	Datetime string `json:"datetime"`
}

type ContextLogger struct {
	TraceId       string       `json:"trace_id"`
	RequestBody   string       `json:"request_body"`
	RequestParams g.Map        `json:"request_params"`
	XRealIP       string       `json:"x_real_ip"`
	ClientIP      string       `json:"client_ip"`
	RequestUrl    string       `json:"request_url"`
	RequestUri    string       `json:"request_uri"`
	RequestMethod string       `json:"request_method"`
	RequestTime   *gtime.Time  `json:"request_time"`
	FinishTime    *gtime.Time  `json:"finish_time"`
	RunTime       string       `json:"run_time"`
	Author        *ContextAuth `json:"author"`
	ResponseBody  g.Map        `json:"response_body"`
}
